<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>

    </style>
    <script src="vue.js"></script>
    <script src="vue-resource.js"></script>
    <script>
        window.onload=function(){
            var mv = new Vue({
                el:'body',
                data:{
                    msg:'welcome world',
                    msg2:'welcome world'
                },
                methods:{
                    get:function(){
                        var _this = this;
                        this.$http.get('a.txt').then(function(res){
                            mv.msg = res.data;
                            _this.msg2 = res.data;
                        },function(res){
                            alert(res.status);
                        });
                    }
                }
            });
        };
    </script>
</head>
<body>
    {{msg}}
    <br>
    {{msg2}}
    <br>
    <input type="button" value="get" @click="get()">
</body>
</html>



















